package com.hqyj.manager.controller;


import com.hqyj.manager.service.MarketingService;
import com.hqyj.pojo.Product;
import com.hqyj.pojo.SeckillProduct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/manager/marketing")
@Slf4j
public class MarketingController {

    @Autowired
    private MarketingService marketingService;

    @GetMapping("/seckills")
    public String seckills(Map<String,Object> map){

        List<SeckillProduct> products = marketingService.findAllSeckill();

        map.put("products",products);



        return "/manager/marketing/seckill";
    }

}
